// export const topicRouter = [
//   {
//     path: '/topiclist',
//     name: 'topiclist',
//     props: true,
//     meta: {
//       title: '话题列表'
//     },
//     component: () => import('@/components/topic/TopicList.vue')
//   },
//   {
//     path: '/topicdetails',
//     name: 'topicdetails',
//     props: true,
//     meta: {
//       title: '话题内容'
//     },
//     component: () => import('@/components/topic/TopicDetails.vue')
//   },
// ]

export const testRouter = {
  path: '/test',
  name: 'test',
  meta: {
    title: '测试'
  },
  component: () => import('@/components/Hello.vue')
}

export const loadRouter = {
  path: '/load',
  name: 'load',
  meta: {
    title: '过渡数据'
  },
  component: () => import('@/components/server/loadParams.vue')
}

export const loginRouter = {
  path: '/login',
  name: 'login',
  props: true,
  meta: {
    title: '登录'
  },
  component: () => import('@/components/server/Login.vue')
}

export const ecRouter = [
  {
    path: '/eclist',
    name: 'eclist',
    meta: {
      title: '企业列表'
    },
    component: () => import('@/components/ec/EcList.vue')
  },
  {
    path: '/echome/:id',
    name: 'echome',
    meta: {
      title: '企业主页'
    },
    component: () => import('@/components/ec/EcHome.vue')
  }
]

export const eventRouter = [
  {
    path: '/eventlist',
    name: 'eventlist',
    meta: {
      title: '活动列表'
    },
    component: () => import('@/components/event/EventList.vue')
  },
  {
    path: '/eventdetails',
    name: 'eventdetails',
    props: true,
    meta: {
      title: '活动详情'
    },
    component: () => import('@/components/event/EventDetails.vue')
  },
  {
    path: '/eventform',
    name: 'eventform',
    props: true,
    meta: {
      title: '活动报名'
    },
    component: () => import('@/components/event/EventForm.vue')
  },
  {
    path: '/formsuccess',
    name: 'formsuccess',
    meta: {
      title: '报名成功'
    },
    component: () => import('@/components/event/FormSuccess.vue')
  },
  {
    path: '/formdenied',
    name: 'formdenied',
    props: true,
    meta: {
      title: '无权限报名'
    },
    component: () => import('@/components/event/FormDenied.vue')
  }
]

export const advisoryRouter = [
  {
    path: '/advisorylist',
    name: 'advisorylist',
    meta: {
      title: '资讯列表'
    },
    component: () => import('@/components/advisory/AdvisoryList.vue')
  },
  {
    path: '/advisorydetails',
    name: 'advisorydetails',
    props: true,
    meta: {
      title: '资讯详情'
    },
    component: () => import('@/components/advisory/AdvisoryDetails.vue')
  }
]

export const errorRouter = [
  {
    path: '/error/:type',
    name: 'error',
    meta: {
      title: '缺省页'
    },
    component: () => import('@/components/errorPage/ErrorPage.vue')
  },
  {
    path: '/',
    redirect: '/advisorylist'
  },
  {
    path: '/*',
    redirect: '/error/404'
  }
]


export const abortRouter = [
  {
    path: '/abortme',
    name: 'abortme',
    meta: {
      title: '关于我们'
    },
    component: () => import('@/components/abort/AbortMe')
  },
  {
    path: '/legalsupport',
    name: 'legalsupport',
    meta: {
      title: '法律支持'
    },
    component: () => import('@/components/abort/LegalSupport')
  },
]

export const routers = [
  loadRouter,
  testRouter,
  loginRouter,
  ...advisoryRouter,
  ...ecRouter,
  ...eventRouter,
  ...abortRouter,
  ...errorRouter
]
